﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Segmentation.UI.Forms
{
    public partial class ModelImageForm : Form
    {

        #region Constructors

        public ModelImageForm()
        {
            InitializeComponent();

            _lColor1.BackColor = Color.Green;
            _lColor2.BackColor = Color.Red;
        }
        
        #endregion Constructors

        #region Properties

        public int ModelWidth
        {
            get
            {
                return Convert.ToInt32(_nudWidth.Value);
            }
        }

        public int ModelHeight
        {
            get
            {
                return Convert.ToInt32(_nudHeight.Value);
            }
        }

        public Color Color1
        {
            get
            {
                return _lColor1.BackColor;
            }
        }

        public Color Color2
        {
            get
            {
                return _lColor2.BackColor;
            }
        }

        #endregion Properties

        #region Buttons Click

        private void _btnSelectColor1_Click(object sender, EventArgs e)
        {
            _colorDialog.Color = _lColor1.BackColor;
            if (_colorDialog.ShowDialog() == DialogResult.OK)
            {
                _lColor1.BackColor = _colorDialog.Color;
            }
        }

        private void _btnSelectColor2_Click(object sender, EventArgs e)
        {
            _colorDialog.Color = _lColor2.BackColor;
            if (_colorDialog.ShowDialog() == DialogResult.OK)
            {
                _lColor2.BackColor = _colorDialog.Color;
            }
        }

        #endregion Buttons Click
    }
}
